#define EMU_CMD_VERSION 0x01 //Retrieves the firmware version.
#define EMU_CMD_GET_SPEEDS 0xC0 //Retrieves the base freq. and the min. divider of the emulator CPU.
#define EMU_CMD_GET_MAX_MEM_BLOCK 0xD4 //Retrieves the maximum memory block size.
#define EMU_CMD_GET_CAPS 0xE8 //Retrieves capabilities of the emulator.
#define EMU_CMD_GET_HW_VERSION 0xF0 //Retrieves the hardware version of the emulator.
 
//Get state information functions
#define EMU_CMD_GET_STATE 0x07 //Retrieves voltage and JTAG pin states.
#define EMU_CMD_GET_HW_INFO 0xC1 //Retrieves hardware information.
#define EMU_CMD_GET_COUNTERS 0xC2 //Retrieves target connection counters.
#define EMU_CMD_MEASURE_RTCK_REACT 0xF6 //Measures RTCK reaction time.
 
//JTAG & Hardware functions
#define EMU_CMD_RESET_TRST 0x02 //Resets TRST.
#define EMU_CMD_SET_SPEED 0x05 //Sets the JTAG speed.
#define EMU_CMD_SET_KS_POWER 0x08 //Sets KS power to on or off.
#define EMU_CMD_HW_CLOCK 0xC8 //Generates one clock and retrieves TDI.
#define EMU_CMD_HW_TMS0 0xC9 //Clears TMS.
#define EMU_CMD_HW_TMS1 0xCA //Sets TMS.
#define EMU_CMD_HW_DATA0 0xCB //Clears TDI.
#define EMU_CMD_HW_DATA1 0xCC //Sets TDI.
#define EMU_CMD_HW_JTAG 0xCD //Handles JTAG connection.
#define EMU_CMD_HW_JTAG2 0xCE //Handles JTAG connection with word aligned data transfers.
#define EMU_CMD_HW_JTAG3 0xCF //Handles JTAG connection with word aligned data transfers and return value.
#define EMU_CMD_HW_TRST0 0xDE //Activates TRST.
#define EMU_CMD_HW_TRST1 0xDF //Deactivates TRST.
#define EMU_CMD_WRITE_DCC 0xF1 //Writes to JTAG using DCC.
 
//Target functions
#define EMU_CMD_RESET_TARGET 0x03 //Resets the target.
#define EMU_CMD_HW_RELEASE_RESET_STOP_EX 0xD0 //Resets the CPU and halts as soon as its possible or the timeout expires.
#define EMU_CMD_HW_RELEASE_RESET_STOP_TIMED 0XD1 //Resets the CPU and halts as soon as its possible or the timeout expires.
#define EMU_CMD_HW_RESET0 0xDC //Activates target reset.
#define EMU_CMD_HW_RESET1 0xDD //Deactivates target reset.
#define EMU_CMD_GET_CPU_CAPS 0xE9 //Retrieves capabilities of the CPU.
#define EMU_CMD_EXEC_CPU_CMD 0xEA //Executes a CPU command.
#define EMU_CMD_WRITE_MEM 0xF4 //Writes to target memory.
#define EMU_CMD_READ_MEM 0xF5 //Reads from target memory.
#define EMU_CMD_WRITE_MEM_ARM79 0xF7 //Writes to target memory on ARM 7/9 targets.
#define EMU_CMD_READ_MEM_ARM79 0xF8 //Reads from target memory on ARM 7/9 targets.
 

//Configuration functions
#define EMU_CMD_READ_CONFIG 0xF2 //Reads the emulator configuration.
#define EMU_CMD_WRITE_CONFIG 0xF3 //Writes the emulator configuration
